
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<script type="text/javascript" src="/static/lib/jquery/1.9.1/jquery.min.js"></script>
<link href="https://res.wx.qq.com/open/libs/weui/1.1.2/weui-for-work.css" rel="stylesheet" >
<title>{$username}-{$year}年工资信息</title>
</head>
<body ontouchstart="">

<div class="weui-cells__title">{$year}年</div>
{if !empty($data)}
<div class="weui-cells">
            {foreach name="$data" item="vo"}
            <a class="weui-cell weui-cell_access"  href="/index/wages/detail/ids/{$vo['id']}">
                <div class="weui-cell__bd">
                    <p>{:date('Y-m',$vo['years'])}</p>
                </div>
                <div class="weui-cell__ft">{$vo['cash_wages']+$vo['bank_wages']+$vo['realhair_royalty']}￥</div>
            </a>
            {/foreach}
</div>
{else}
<div class="page__bd">
        <div class="weui-loadmore weui-loadmore_line">
            <span class="weui-loadmore__tips">暂无数据</span>
        </div>
    </div>
{/if}

</div>
<div class="weui-btn-area">
    <a href="javascript:;" class="weui-btn weui-btn_primary" id="showPicker">选择年份</a>
</div>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script src="https://res.wx.qq.com/open/libs/weuijs/1.0.0/weui.min.js"></script>
<script type="text/javascript" class="picker js_show">
    $('#showPicker').on('click', function () {
        weui.picker([
            {label: '2018年', value: 2018}, 
            {label: '2019年', value: 2019}, 
            {label: '2020年', value: 2020}, 
            {label: '2021年', value: 2021}, 
            {label: '2022年', value: 2022}, 
            {label: '2023年', value: 2023}, 
        // {
        //     label: '公交票 (disabled)',
        //     disabled: true,
        //     value: 3
        // }, 
        ], {
            defaultValue: [{$year}],
            onChange: function (result) {
               // console.log(result);
            },
            onConfirm: function (result) {
                //console.log(result[0]);
                window.location.replace("/index/wages/lists/year/"+result[0]);
            }
        });
    });
</script>
</body>
</html>